﻿package Engine.error
{
    import flash.utils.*;

    public class SystemErrorCode extends Object
    {
        private static var _map:Dictionary = new Dictionary();
        public static const ExceptionCodeUnkown:int = 10000;
        public static const ExceptionOutOffMemery:int = 10001;
        public static const ExceptionCodeBase:int = 10002;
        public static const ExceptionCodeStd:int = 10003;
        public static const ExceptionCodeDateTime:int = 10004;
        public static const ExceptionCodeFunction:int = 10005;
        public static const ExceptionCodeNullHandle:int = 10006;
        public static const ExceptionCodeDB:int = 10007;
        public static const ExceptionCodeSerialize:int = 10008;
        public static const ExceptionCodeLang:int = 10009;
        public static const ExceptionCodeXml:int = 10010;

        public function SystemErrorCode()
        {
            return;
        }// end function

        public static function getErrorByCode(param1:int) : String
        {
            return _map[param1];
        }// end function

        public static function isInError(param1:int) : Boolean
        {
            return param1 in _map;
        }// end function

        public static function get map() : Dictionary
        {
            return _map;
        }// end function

    }
}
